<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html><head>
<title>libcarcode.widgets.widget</title>
<style>
body {
    background:white;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #4FA4FF; }
h2 { color: white; background: #4FA4FF; }
h3 { color: white; background: #00557F; }
h4 { color: white; background: #00557F; }
    
a { color: #AA5500; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>libcarcode.widgets.widget</h1>

<h3>Classes</h3>
<table>
<tr>
<td><a href="#Widget">Widget</a></td>
<td>Base widget class</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="Widget" ID="Widget"></a>
<h2>Widget</h2>
<p>
 Base widget class 
</p>
<h3>Derived from</h3>
None
<h3>Methods</h3>
<table>
<tr>
<td><a href="#Widget.__init__">Widget</a></td>
<td>@param pos tuple with widget position (x, y) @param size tuple with widget size (width, height) @param backcolor tuple with background color information (r, g, b, a) @param forecolor tuple with foreground color information (r, g, b, a) @param fontcolor tuple with font color information (r, g, b, a)</td>
</tr><tr>
<td><a href="#Widget.draw">draw</a></td>
<td>Draw the widget</td>
</tr><tr>
<td><a href="#Widget.events">events</a></td>
<td>Widget event processing function</td>
</tr><tr>
<td><a href="#Widget.get_pos">get_pos</a></td>
<td>Get the widget position tuple</td>
</tr><tr>
<td><a href="#Widget.get_size">get_size</a></td>
<td>Get the widget size tuple</td>
</tr><tr>
<td><a href="#Widget.set_pos">set_pos</a></td>
<td>Set the widget position</td>
</tr><tr>
<td><a href="#Widget.set_size">set_size</a></td>
<td>Set the size of the widget</td>
</tr>
</table>
<p><a NAME="Widget.__init__" ID="Widget.__init__"></a>
<h4>Widget (Constructor)</h4>
<b>Widget</b>(<i>*args, **kargs</i>)
<dl>
<dt><i>pos</i></dt>
<dd>
tuple with widget position (x, y)
</dd><dt><i>size</i></dt>
<dd>
tuple with widget size (width, height)
</dd><dt><i>backcolor</i></dt>
<dd>
tuple with background color information (r, g, b, a)
</dd><dt><i>forecolor</i></dt>
<dd>
tuple with foreground color information (r, g, b, a)
</dd><dt><i>fontcolor</i></dt>
<dd>
tuple with font color information (r, g, b, a)
</dd>
</dl><a NAME="Widget.draw" ID="Widget.draw"></a>
<h4>Widget.draw</h4>
<b>draw</b>(<i></i>)
<p>
 Draw the widget 
</p><a NAME="Widget.events" ID="Widget.events"></a>
<h4>Widget.events</h4>
<b>events</b>(<i>event</i>)
<p>
 Widget event processing function 
</p><dl>
<dt><i>event</i></dt>
<dd>
event object
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
True if the widget handles the event, false otherwise
</dd>
</dl><a NAME="Widget.get_pos" ID="Widget.get_pos"></a>
<h4>Widget.get_pos</h4>
<b>get_pos</b>(<i></i>)
<p>
 Get the widget position tuple 
</p><dl>
<dt>Returns:</dt>
<dd>
widget position tuple (x, y)
</dd>
</dl><a NAME="Widget.get_size" ID="Widget.get_size"></a>
<h4>Widget.get_size</h4>
<b>get_size</b>(<i></i>)
<p>
 Get the widget size tuple 
</p><dl>
<dt>Returns:</dt>
<dd>
widget size tuple (width, height)
</dd>
</dl><a NAME="Widget.set_pos" ID="Widget.set_pos"></a>
<h4>Widget.set_pos</h4>
<b>set_pos</b>(<i>pos</i>)
<p>
 Set the widget position 
</p><dl>
<dt><i>pos</i></dt>
<dd>
tuple with widget position (x, y)
</dd>
</dl><a NAME="Widget.set_size" ID="Widget.set_size"></a>
<h4>Widget.set_size</h4>
<b>set_size</b>(<i>size</i>)
<p>
 Set the size of the widget
</p><dl>
<dt><i>size</i></dt>
<dd>
tuple with widget size (width, height)
</dd>
</dl></p>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>